import { BuffType } from "../../buff/const/BuffType";
import { BuffConfig } from "../../buff/data/BuffConfig";
import { BattleRole } from "../../role/BattleRole";
import { ITriggerResult } from "../../trigger/const/ITriggerResult";
import { IEffectData } from "../const/IEffectData";
import { EffectBase } from "../EffectBase";

/**
 * 加buff效果
 */
export class AddBuffEffect extends EffectBase {
    // effectData: IEffectData;
    // params: { buffId: number };
    excute(args: { caster: BattleRole; target: BattleRole; results: ITriggerResult[]; }): void {
        let buffData = BuffConfig.BuffConfi[this.params.buffId];
        let target = args.target;
        target.buffMgr.addBuff(buffData)
        console.log("触发添加buff效果")
    }

    get params(): { buffId: number } {
        return this._params
    }
}